﻿// Copyright Microsoft

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;
using System.ComponentModel;

namespace Microsoft.Samples.SqlServer.Activities
{
  //Current version uses SharePoint operator names. The next version will use more friendly enum names.
  //  EqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, NotEqualTo
  // NEXT: IsNull, IsNotNull
  public enum SqlComparisonOperatorEnum
  {
    Eq, Neq, Gt, Geq, Lt, Leq, Like
  }

  //NEXT: Add more types
  public enum TypeEnum
  {
      String, Number, Currency, DateTime
  }

  [Designer(typeof(Microsoft.Samples.SqlServer.Activities.Designers.SqlWhereDesigner))]
  public sealed class SqlWhere : Activity
  {
    public string ColumnName { get; set; }
    public SqlComparisonOperatorEnum SqlComparisonOperator { get; set; }
    public object Value { get; set; }
    public TypeEnum ValueType { get; set; }
    public LogicalOperatorEnum LogicalOperator { get; set; }
  }
}
